const { readFile, baseUrl, request } = require('../base.js');
const Cookie = readFile('Cookie.txt');    //用户Cookie

/* 查询公告
* 传入参数 @params: {
*    now:当前13位时间戳
* }
*/
module.exports = async function findDrawNotice() {
    try {
      const url = `${baseUrl}/inx/awards.html?now=${Math.floor(new Date())}`;
      let res = await request({
        url,
        headers: {
            "accept": "*/*",
            "content-type": "json/application; charset=utf-8",
            "cookie": Cookie,
            "Referer": `${baseUrl}`,
        },
        body: null,
        method: "GET"
      });
      return res;
    } catch (error) {
      return error;
    }
  }